home *** CD-ROM | disk | FTP | other *** search
/ Champak 132 (Alt) / Vol 132.iso / games / crazy_ch.swf / scripts / frame_3 / DoAction_4.as < prev    next >
Encoding:
Text File  |  2011-06-09  |  1.9 KB  |  98 lines

  1. function heliMove()
  2. {
  3.    heli._y += 0;
  4.    heli._y -= heli_speed;
  5. }
  6. function heliUp()
  7. {
  8.    if(heli_speed < 7 && live == 0)
  9.    {
  10.       heli_speed += 0.8;
  11.       heli._rotation += 1;
  12.    }
  13. }
  14. function heliDown()
  15. {
  16.    if(heli_speed > -6 && live == 0)
  17.    {
  18.       heli_speed -= 0.8;
  19.       heli._rotation -= 1;
  20.    }
  21. }
  22. function scoreplus(sss, aaa)
  23. {
  24.    clearinterval(noscore);
  25.    s_score = "point_p_10" + scoree;
  26.    var _loc1_ = attachMovie(sss,s_score,scoree + 200000);
  27.    scoree++;
  28.    _loc1_._x = aaa._x;
  29.    _loc1_._y = aaa._y;
  30.    score_MC_AR[scoree] = _loc1_;
  31.    noscore = setInterval(score_fade,20,score_MC_AR[scoree]);
  32.    score_MC_AR_del[scoree] = noscore;
  33. }
  34. function score_fade(bbb)
  35. {
  36.    bbb._y -= 3;
  37.    bbb._alpha -= 5;
  38.    if(bbb._alpha <= 10)
  39.    {
  40.       clearInterval(score_MC_AR[bbb]);
  41.    }
  42. }
  43. live = 0;
  44. clearInterval(heli_inter);
  45. var mousecheck_inter;
  46. var y_ss = 602;
  47. var heli_inter;
  48. heli_speed = 0;
  49. var mouse = new Object();
  50. if(sound_aa != 2)
  51. {
  52.    var enemy_mp3 = new Sound();
  53.    enemy_mp3.attachSound("heli.wav");
  54.    var enemy_mp4 = new Sound();
  55.    var enemy_mp5 = new Sound();
  56.    sound_aa = 2;
  57. }
  58. mouse.onMouseWheel = function()
  59. {
  60.    if(go33 == 1 && ammo > 0)
  61.    {
  62.       ammo--;
  63.       shoot(heli,"missle");
  64.       go33 = 0;
  65.    }
  66. };
  67. mouse.onMouseDown = function()
  68. {
  69.    if(music._currentframe == 1 && musicon != 1)
  70.    {
  71.       music.gotoAndPlay(2);
  72.    }
  73.    if(player == 1)
  74.    {
  75.       if(sound_con._currentframe == 1)
  76.       {
  77.          sound_con.gotoAndPlay(2);
  78.       }
  79.       clearInterval(mousecheck_inter);
  80.       mousecheck_inter = setInterval(heliUp,8);
  81.    }
  82. };
  83. mouse.onMouseUp = function()
  84. {
  85.    if(player == 1)
  86.    {
  87.       clearInterval(mousecheck_inter);
  88.       mousecheck_inter = setInterval(heliDown,8);
  89.    }
  90. };
  91. Mouse.addListener(mouse);
  92. heli_inter = setInterval(heliMove,20);
  93. scoree = 0;
  94. var noscore;
  95. var score_MC_AR_del = new Array();
  96. var score_MC_AR = new Array();
  97. enemy_mp3.stop();
  98.